﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;


namespace appladen.csvwerk.test
{
    [TestFixture]
    public class Header_von_Daten_trennen_Test
    {
        [Test]
        public void gibt_header_zurück()
        {
            var sut = new Header_von_Daten_trennen();
            string[] eingabe = { "Header", "foo", "bar" };

            string result = null;
            sut.Header += s => result = s;
            

            sut.Process(eingabe);

            Assert.That(result, Is.EqualTo("Header"));
        }

        [Test]
        public void gibt_daten_zurück()
        {
            var sut = new Header_von_Daten_trennen();
            string[] eingabe = { "Header", "foo", "bar"};

            IEnumerable<string> result = null;
            sut.Daten += s => result = s;
            

            sut.Process(eingabe);

            Assert.That(result, Is.EqualTo(new [] {"foo", "bar"}));
        }
    }
    
}
